package com.dobbinsoft.iotechn.data.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.lang.reflect.Method;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: rize
 * Date: 2020/3/20
 * Time: 20:35
 */
public interface IMapper<T> extends BaseMapper<T> {

    public default boolean checkOwner(Long id, Long developerId) {
        T t = this.selectOne(new QueryWrapper<T>().select("id").eq("id", id).eq("developer_id", developerId));
        return t != null;
    }

}
